package com.xy.demo.Util;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

public class Constant {

    public static Map CODE_MAP = new HashMap();

    //新建状态Integer
    public static final Integer NEW_STATUS_INTEGER = 0;

    /**
     * easyExcel 分批
     */
    public static class ExcelBatchCount {
        public static final int BATCH_COUNT_TEN              = 10 ;
        public static final int BATCH_COUNT_HUNDRED          = 100 ;
        public static final int BATCH_COUNT_THOUSAND         = 1000 ;
        public static final int BATCH_COUNT_TEN_THOUSAND     = 10000 ;
        public static final int BATCH_COUNT_HUNDRED_THOUSAND = 100000 ;
        public static final int BATCH_COUNT_MILLION          = 1000000 ;
    }

    /**
     *  存储目录
     */
    public static class  Directory{
        public static final String Desktop = "C:/Users/EDY/Desktop";
        public static final String Desktop_Demo = "C:/Users/EDY/Desktop/demo";
    }



    /**
     * config 配置
     */
    public static class CONFIG {
        public static final String CRYPTO_SECRET = "play.crypto.secret";

        public static final String COOKIE_PREFIX = "cookie.prefix";

        public static final String UPLOAD_URL = "upload.url";
        public static final String UPLOAD_PATH = "upload.path";
        public static final String BASE_URL = "base.url";

        public static final String EXCEL_PATH = "excel.path";
        public static final String MOBILE_URL = "mobile.url";
        public static final String WAP_URL = "wap.url";
        public static final String WEIXIN_URL = "weixin.url";

        //weixin
        public static final String WEIXIN_TOKEN = "weixin.token";
        public static final String WEIXIN_APPID = "weixin.appId";
        public static final String WEIXIN_APPSECRET = "weixin.appSecret";
        public static final String WEIXIN_ENCRYPT = "weixin.encryptMessage";
        public static final String WEIXIN_AESKEY = "weixin.encodingAesKey";


        public static final String WXAPP_APPID = "wxapp.appId";
        public static final String WXAPP_APPSECRET = "wxapp.appSecret";
    }


    /**
     * 时间
     */
    public static class TTL {
        public static final int ONE_SECOND = 1;
        public static final int ONE_MINUTE = 60;
        public static final int ONE_HOUR = 60 * 60;
        public static final int ONE_DAY = 60 * 60 * 24;
        public static final int ONE_WEEK = 60 * 60 * 24 * 7;
        public static final int ONE_MONTH = 60 * 60 * 24 * 30;
        public static final int ONE_YEAR = 60 * 60 * 24 * 365;
    }


    /**
     * 状态
     */
    public static class ORDER_STATUS {
        public static final String PENDING = "pending";
        public static final String PENDING_PAYMENT = "pending_payment";
        public static final String PROCESSING = "processing";
        public static final String SHIPPED = "shipped";
        public static final String PICKUP = "pickup";
        public static final String COMPLETE = "complete";
        public static final String CANCELED = "canceled";
        public static final String CLOSED = "closed";
        public static final String HOLDED = "holded";
        public static final String FAKE = "fake";

        public static String getText(Object o) {
            String s = Util.toString(o);
            if (PENDING.equals(s)) {
                return "待支付";
            } else if (PENDING_PAYMENT.equals(s)) {
                return "支付中";
            } else if (PROCESSING.equals(s)) {
                return "待发货";
            } else if (SHIPPED.equals(s)) {
                return "待收货";
            } else if (PICKUP.equals(s)) {
                return "待自提";
            } else if (COMPLETE.equals(s)) {
                return "已完成";
            } else if (CANCELED.equals(s)) {
                return "已取消";
            } else if (CLOSED.equals(s)) {
                return "已完成";
            } else if (HOLDED.equals(s)) {
                return "已挂起";
            } else if (FAKE.equals(s)) {
                return "模拟的";
            }
            return s;
        }
    }





}
